package com.fengwk.support.spring.boot.config;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;

import com.fengwk.support.crossorigin.DefaultCrossOriginFilter;

public abstract class AbstractCrossOriginFilterConfig {

	@Bean
	protected FilterRegistrationBean createCrossOriginFilter() {
        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setFilter(new DefaultCrossOriginFilter());
        registration.addUrlPatterns("/*");
        return registration;
    }
	
}
